package day0319;

import java.util.Random;

public class Test7 {
    public static void main(String[] args) {
        int[] arr2={0,0,0};

        Random ra=new Random();
        //2.给数组中存入三个随机数
        arr2[0]=ra.nextInt(50);
        arr2[1]=ra.nextInt(50);;
        arr2[2]=ra.nextInt(50);
        //取出三个元素
        int ele0=arr2[0];
        int ele1=arr2[1];
        int ele2=arr2[arr2.length-1];
        System.out.println(ele0+","+ele1+"," +ele2);
    }
}
